Bug fixes for category endpoint