Fixed bug in rgb