Fixed bounds checking