fixes to improve code quality