Fixed glfw event handling