Fix some issues from scrutinizer