Fixed field names and small bug fixes