fixed error on insert