Clamp window to 1000000

Prevents window wrap around