DIRTY GLOBALS FIX