Fixed a bug in buildjson script