Change type to target_type. And change argument for porter.py.