Fix Bugs in showing keyboard