Whoops, global variables fix