#345: fixed: undefined method [] for nil:NilClass