fixed result_type case bug