Fix error thrown on resolving BaseDirectory