fixed some errors and a problem with blocking socket in alarm cascade