Fix insert query