some fixes for orders