Using the if statement with the Serial monitor

What is the line-ending in serial monitor set to?

It's somewhere in the right bottom. I guess it's set to carriage return and line feed

"Max" is not the same as "Max\r\n".

Change the line ending to none.