bug fix: undefined method to_char for string