Fixed up some of the type inference