fix remaining issues detected by scrutinizer