Adds alert handler. Not working yet.