Revert "Reapply from master branch (4234340323b55fcc90137e3d8292426b7a6e834a)"

This reverts commit f23f3926d709cf4fa6829785d22f19175cb1e07d.