Add bounds checking on the stat line