fixed bugs in symlinking script