window scope not working?