Fixed memory leak in operator=