bug fix in ::unload