More fixes for memory model