Fix checking for path variable