Forward sampling fix for Issue #117

Added one test as well