Fixes unset index error where heading is left blank.

Signed-off-by: Eric Fernance <beanie@purplebeanie.com>