corrects the permalink

now will react to the users set settings