Please check if you have ticked "Continue selling when out of stock". Untick it if you would like to stop selling when inventory is zero.