Fix flash and error messages