Fixing error flash messages