Improving Keyboard stability. Fixes #536