Fix build error when building from scratch