[FOLD] Fixes:
* Fix build error on clang
* Fix issue Nik caught
* Take suggestions from code review