Improved the way of showing alerts