Fix build errors on specs