bug fixes for unix