Added some sanity check's