fix state issue