fix bug in plant deletion