More fixes based on Scrutinizer CI's inspection