Cleaned up so rows are properly deleted