fix incorrect usage of main in example

fixes Bug 24259