revert and made changes to checkout and checkoutDb.php, now they should be fine