fixed query range safeguard again