fix object access type inference bug, better unify errors