fixed issue that caused some links not to work except when the screen is refreshed