fix to TypeError: can't convert nil to String