Added some sanity checking