Update take-step-pattern

Fixes a bug in pattern manager.
Adds some tests for take-step-pattern.