Fixed API problems