How to fix 'This application has requested the Runtime to terminate it in an unusual way'