error fixed - sanity check works