Fixed bug in each method