fix path logic issue