Fixing path issues with script