call clear method after executing the query. avoids problems which arised due to the fact that the clear call in the select() method was removed