fixed req.flash error