Fix category reset bug on rotation