query fixed. Red code fixed