Update max number of steps calculation logic.