change dispose to finally