fix path check