write_test and int_str bug