You haven't checked if isInsertOk is true.