debug and fixes to order controller