Fixed a bug when selection only one category.. trim