Fixed #4249 by add retain count for extension string