fixed postg order bug