Revert "Fixed bug in contrast checking algorithm."

This reverts commit d93893b22577c0e7152be32a577ec3d67c27f270.