fixed missing global flag