BUG: long->int on 32-bit platforms for exception checking purposes