small fixes for query method after functional testing