code quality fixes