fixes error in path logic