fixed some linking errors