fixed potential errors with super globals. thx @mindcrime