Ugly fix for an ugly script.