Raised exception on invalid state