bug fixes in categroy + todo