Fixing a few minor issues flagged up by scrutinizer