fixed some compiling problems
fixed error with unloading module