fix long/int mismatch