Fixed problem with flash messages