Fixed bug where build file being overwritten if value is empty array