Removed !global variable, this caused problems.