Fixed stochastic AssertionError in test_step