Han's changes + fix empty category