Fixed keyboard hide/show inconsistencies