fixed 'to_str' method not found exception in 1.8.7