divide by zero fix in process_step()