multiple fixes for Solaris related issues.