Fixed invalid error for read in case if there is no state

dnet_mix_states sometimes returnes 0 as result, which is invalid
Merge pull request #197 from euroelessar/stable

Fixed invalid error for read in case if there is no state