Validating transactions and fixing bugs