Minor fix on mem stuff