corrected path generation