Admin panel queries fixes