Making sure that the graphics are disposed

It should help reduce the change of any errors
Thread stopped when closing form