fix permalink generation