Fix mouse hide show behaviour with debugger