adapt flash messages