Fixing bitmap memory leak