fix query since state doesn't change for some reason