new bug fix in getColorAt function