fixing path check