Fix of element size differs. + Checking persisted

from https://github.com/noma4i