Fixed a bug with accessing an undefined current path