Add bounds checking for mmapper