Fix id checks (#49)