Leaking of drawing context fixed