Fixed some API breaking bugs