fix bz1025229 and bz1025055

[merge]