Reapply changes lost in difficult merge
Re-apply changes lost in difficult merge #2