Fix https://github.com/numenta/nupic/issues/1131