Fix a bug that was creating crashes.