Patch

Fixes the edit function.