Fix the implementation for hasPathSum problem.