Corrected plan insert bug