Merge "Update the code to avoid memory issues."