improve build script

Removed in the new patch