You must not recursively call main. Not just in your release program, but in any code. Things can go wrong if you do. Therefore, you should use a loop instead.