bugfix for endless loop on getnotsorandomcolor