fixes pending order bug