fixed warning messages not disppearing in certain situations