fixed a bug in UserInputHandler::handleMsg()