Fixed condition when actual is >= maxvalue