very ugly workarounds for bugs in elm runtime