fix type error for emitting states buffer. change default threads to 2 instead of none to fix compile error.  need to parameterize properly...