Fixed according to code review