Crappy implementation of a fix to issue #147