Small bug fix on method