fix bug causing Solaris crashes