Second attempt at fixing queueStateUpdate()