Fixed a method bug