*added check for canvas scroll to make sure window exists (fixes stderr errors)