Buildscript fixes