fixed problem with each