Select cover algorithm fix