Solving problems with 'restoring' casted objects.