Removed unused mode var.