Fix insertion bug