fixed some code review issues