fixed some minor errors reported by scrutinizer