Apply patch recommended on bugzilla #939.