fixed infinite loop in the spout