Fix bugs from issue #95 patched in branch v0.6.1.1-beta