improve way of resetting category

and removed wrong method
Merge branch 'master' of github.com:rapila/cms-base