Fix warden middleware