Added a check for an already colored pixel