defensive programming
fix argo middleware