Added Alice's fix for flash messages