almost done with API

I don't know why, but program crashes if i try to start extension again
after stopping it