Fixed termination of application through invalid code input.