fix end prep