fixed permalink code