fix invisible mouse issue and some other stuff