Latest version with type fixes