adds a semicolon on the moment of object close