fixing categories bug