fixed bug that rendered links off on click event