Fix exit

https://groups.google.com/forum/#!topic/osmand/tgdBv_-ht3E