add check for too-high left/right values; use min/max difference instead of largest value