Fixed a bug in the sid_to_string method.