Fix infinity build errors