fixed insert handler code generation