fixed scope issue from previous commit