Fixes links when clicking badges, closes #238 and #239