fixed some code quality issues