Using End is not a very good idea. You should take steps to properly unload and exit your application.