added test related to issue #2622 and some cleanup
Merge pull request #2624 from gurbuzali/object-memory-format-fix/3.2.3

Object memory format fix/3.2.3