Swap type to int