Pushed to upstream: Fix plugins

cc/ @shuyangzhou @cgoncas