Build script and fixed forge bugs