fix state return