Minor fixes reccomended by scrutinizer