impoved handling of #904