Memory saving fix