fixing bugs raised by strict checking