Fixing the logic path of steps