Added min-max window handling.