fixed reversing the path