Fix according to eric's comment. Create a new permalink.getHref