Improved min period heuristic