Fix precheck based on real use.

Precheck is still kinda messy, but it isn't crashing now.