fixing some issues from scrutinizer