fix alerts; clean up debug messages