Pushed to upstream

cc/ @migue @cgoncas.