Fixed bug when executing as symbolic link