added fix for multiple links and altered panel functionality