Improved steady state detection (more efficient)