fixed some script issues on ubuntu