Fix for orders crashing the application