Memory fixes again
compile fixes