Bump max_iterations to 50.

10, and even 20, was not enough.

Also, print a message when maximal iteration is reached.