Why is my state return rejected found nothing wrong?