fixes issue #2037
some cleanups
Merge pull request #2054 from ahmetmircik/recordVersion

Fixes issue #2037