fix previous function for category
Merge pull request #4 from nilo-webd/master

fix previous function for category