bug fix in new order controller function