Fixed a few strange order bugs that happened in the restructuring.