Issue 534. Fixes after code-review