Fix middleware import in sample settings