Fix wrong domain

Casted value should be lexicon's key.
Add missing rewind

It is required for two or more elements.