Preliminary commit for issue #99 bugfix