Fixed wrong test in resultSet handling