less crash and less memory leaks https://fotonauts.fogbugz.com/default.asp?13077