Fixes bug 35

Resolves #35 see issue for details.

@copenhas mind taking a look, should be all we need.