fixed SIGSEGV when quitting
TODO done: mouse won't move when scroll