Solaris fixes for bugs #501 and #502