Build and UT fixes