substring category key fix