Harden against short message errors
Trap index out of range error