fixes for bug 760876 based on the last try push