Fix category in permalink button. Close #571