Added lower bound checking.