Updated middleware installation