Fixed to be compatible with latest Dart.