memory leak fixed in surface