modified the conditionals for displaying links, refs #398