fix bug each