correct mishandling of callback state