partially revert commit 335d82bf3d2fb8309e6d9a7e0627f59acdb8bff0