Fix runtime errors with annotations.