Fixing issue #81 and v0.5.9