Build script bug fixes.