Ugly fix for an ugly API