Fixed remaining issues from scrutinizer report