fixed alerts bug due to loging middleware