fix converter to handle resolved identifiers correctly. fix test