Fixed CleanupFields() bug