Fix frame selection bug.