Revert "DO NOT MERGE: fixes for build"

This reverts commit 03ae21f032808d4e0e0ad228b000b74511f9b9e8.