fixed #3 - added permalink logic after searching