Pushed to upstream

cc/ @JorgeFerrer @topolik