Bug fixes to marking of saturated pixels