Fix for #81

Its not nice and generic but at least it works.