Fix issue #82

There is still some "unwanted behaviors".

See discussion in issue #82