Build script fix #531