Fix basepath for cases where it is not provided