Fixed flash messages by writing my own flash scope middleware.