fixed issues pointed in code review