Fixed delete logic (path issue)