fix categorical trait