Fix path check