fix bug with alert message showing for few seconds