Fixed error in method