fixed some transactions bugs