fixed a bug with single step. single step will still not work correclty though