Fixed some small issues mentioned by Scrutinizer.