fixing permalink button modal functionality