Edit and delete bug