Fixed build task failing on first run