fixed error flash messaging