replace 2 assert()s with CrashIf()s