Fixes creating transactions and error handling