Fixed all compilation issues due to changes in the API for immutable field and record types