fixed memory leak in uniform