Various bugfixes when placing orders