Fixed type inference issue