Stop browser when last document ends