Fix bug in steptype()

There were two bugs: the function argument shadowed the mode variable, and the semifixed mode would never actually be set.
Merge pull request #633 from starwed/mode-fix

Fix bug in steptype()