Fix a couple JS errors and hopefully fixed the bug that allowed orders to be submitted twice