fix insert query