added check for out-of-range zoom on X