fixed errors due to empty variables on install
fixed sort issues for top hat links