Revert "remove type conversion"

This reverts commit 5c752a0ca2939af80563b01c11255ec417679706.