Adam L . - Added some protection to avoid errors when quitting a browser