Fix incorrect isState function in states