fix deleting from local db