Fixed type mismatch in models