fix lastInsertId issue #4