Fix for upstream issue #85

I think this is the solution for the issue I found. Can you check it please?