fix test precondition checks.