Actually fixed bug when using hasNext in DBHelper