fixed seg fault on showing categories