Fix bug in pathmanager