fixes for gcc46