fixing missing path check