fix minor scope bug