bugfix: NCOLOURS should be number of elements, not bytes