Sanity check functionality modified.