Fixed wrong beta loop order in check scan