fixed bad data bug