add method bug fix