[bugfix] error handler middleware was not working because it was loading after the routes had initialized