Fixed cascading deletion error