prod fixes for weird order sql issues