fix inference