fixed to handle nativePath correctly