Minor fixes

Based on @honzajavorek commit, code-review fixes.