Fixed two bugs preventing storage units from being deleted from the database.