Fix issues obtains by scrutinizer