Tidying up

from: http://sourceforge.net/p/tmux/mailman/message/32077110/
The flag needs to be cleared before next iteration