Fixing bug in colors array trimming.