Fixed a bug when creating a build