fix running queries with multiple users