fix path logic