60 properly order middleware
fixes #60
fixes #58