improve local rendering, fix a bug in pgp encryption that arose after web workers