fixing callback scope