more memory fixing