Fixed error in transactions