fixing manual query front insert