decrement num on close