Fix slug generation when editing

This is a bug.