fixed a problem where the last iteration step resulted in undefined, but was not caught until the next call
0.0.5