Fixes to the conditional checker. Changed while to use the new conditional checker.