Fixed bug that caused the app to error out if records = null.