fix build error and another aliasing violation