fixed some dynamic linking