fix code review issues