restore an ugly scope check