Fixed global functions taking model arguments.