fixed issues raised by code reviewer