Fix a lovely NPE issue because of orders
Fix a few things