Fixed hard-coding in URL generation for permalink