fixed duplicate BuildMode bug