typo
various fixes
various fixes found by Scrutinizer