[ticket/289] Fix some scrutinizer issues

Fixes #289

(at least some parts of it ;) )