fix some bigger solaris crashs and linking issues