Possible fix for crashing on paths