added resignFirstResponder() statement