Improved behaviour

- recoded hotkeys behaviour to enable them only when appropriate
- minor bug fixes