fix for in last_insert_id check