Replace hack with slightly less bad hack