Lotto: Sync with upstream