various bug fixes

breaking in the library a bit on my in-office application.... fixed some
data copy/management bugs and a showstopper with plugins.