Fixed bug in initialization of STM for non-binary outputs.