[FIX] Resolve reference not return the right type