fixed minor bug in permalink