Updated from commit efa50b0258ad32087a18c86b2b48dfd0346b69da.