more fixes in malloc