fix undefined proxy_type bug