Remove bad query