fix keyboard popping up (and other bugs)