Fixes issue #4 (closed) reported by Matthieu and another bug found by Aidan.
mentioned in commit cd64e179