small fixes and some linking