finalize, it works now fine