fix some errors on build process