Fix issue #79 and workaround #85