fix a bug with passed in path