Fix issues in code review