Fixed memory corruption due to early unloading of dynamic libraries upon exit. Thanks to Istvan Fehervari for spotting the problem!
Fixed minor error occuring in the post-install script when update-desktop-databese is not available.
Thanks Istvan Fehervari for spotting this error and proposing a fix!