Fix bug in categories view