Fixed delete bug in DB