Fixing deletion error