Horrible, vile, disgusting hack. But it works.