fixes some basepath issues