fix upstream check