Made numcomments increment in threads api safer