fix unparser and related code