Scrutinizer issue fixes