bug fix for routes and plugins sequence