Proposed fix for issues #22