fixed few minor issues detected by Scrutinizer