Bug get index on method's result