add inversion, fix unload issue