remove some unnecessary cast