fix cycle spout code