Improve getting permalink.