Applying changes made in commit fa1f9ec13113e00e65f2425b080cfb0d102b0872 to this branch.