tmp_name and type where misplaced