fixes as per code review