Fixed a bug in "colorize" function