added SimpleQueryTest, fixed an issue with batch mode