fixed error prone issues