Fix validate_thread_count method for minus thread numbers.