finally fixed once and for all by which i mean clumsily patched