permalink bug fix