fixed huge bug in checkout script, working fine now