[Issue #69] Guarding against index out-of-bounds

Signed-off-by: Mattt Thompson <m@mattt.me>