fix bug in nx_str