Some API fixes