Fix build errors