fixed random crashes in shutown sequence
alerts API is now threadsafe
todos review + adding some warnings