Ugly hack that works