fixed build script when version does not exist