Fixed alerts not being dismissed