Changing INVALID_STATE_ERROR to InvalidStateError per review comments