API changes

Bugs fixed