Fixing activity so the keyboard doesn't pop up at the incorrect times.