fixing some bugs with unloading