Fixed bug that did not gather type propperly on restore.
Merge branch 'test' into dev