Modified cast so that it converts the int to a long before casting to