try to fix long <-> int snafu