fix a bug in categories