improved code in TypeSystemAdapter, made getUnsigned private again