Removed straying flag variable