added undo for type fields