Added missing onStop call, moved the call after onStep is called. Fixed issue when passing a string (of an int) into the update method causes issues with the calculations.