Fixed bug with error flash