bounds checking to deal with temporary lazy code