Fix various insanities