Fixes state location for Queries