Tweaking type inference