resizeForKeyboard improvement fixes #1