added a sanity check