fix the code, to return the right last insert id.