fixed several linker errors