Better handling of keyboard dismissal.