Added middleware back in