fix category being split into newline when window width is too small