fix bug in flash errors and switch to underscore