Fixed issues based on code review