fixed the ifStatement insert bug