Fix for issue 632

I tested the fix and it works.

I haven't tested the test (oh, irony), because for some reason I couldn't get nose to work, but the test itself is very straigthforward.