stability fixes in malloc