Can someone tell me if this is the way it's supposed to work?

Someone orders a product - there's only one in the inventory. They go through checkout and move on to the paypal page. The product is then marked as sold out. The person cancels at paypal so no order is made - the products stays marked as sold.

Is this the way it's supposed to work? If so, is there a way to make it not mark the item as sold out until it gets paypal confirmation?