Fixed order creation and added simple error handling