Fixed error message displaying.