fix usage of nforder.lib and a few other small changes