fix create new transaction function