memory leak (address boundary error) fixed