Addition of Max check

Still doesn’t work.