Fixed syntax erros in Middlewre