Fix last inserted id