Script fixes for gradle