Several bugfixes for step recognition in StateVersion1.