Fixed states-check and raising adequate exception otherwise.