Fix undefined index in AbstractFormatter