build number type bug fix

Also, export build number to API