Fixes to sram stuff