Fix warning (globals etc)