porting PLATFORM-308 related changes