fixed prims so no more cycles between levels