cast maxrecords (#230)