more guards and an sram fix