Fixed category() so that it runs correctly