fix memory leak on uniforms