I don’t see the problem with all global variables, only specifically ‘top’. If you change that to a var or rename that variable to something different the error goes away. I can’t see where else top is being defined and used, but making that change will allow you to progress while I look into this some more.