private void updateTaoRankings() {
        if (lastRBRanking > 0) {
            if (taoRankings != null) {
                taoRankings.clear();
            }
            if (taoRankingsByName != null) {
                taoRankingsByName.clear();
            }
        }
        Connection con = DatabaseConnection.getConnection();
        lastTaoRanking = System.currentTimeMillis();
        PreparedStatement ps = null;
        ResultSet rs = null;
        try {
            ps = con.prepareStatement("SELECT c.name, c.taorank, c.clantaorank, c.reborns, c.taocheck, c.clan AS clan FROM characters AS c LEFT JOIN accounts AS a ON c.accountid = a.id WHERE c.reborns > 10 AND c.taocheck > 10 AND a.gm < 3 AND a.banned < 1 ORDER BY c.taorank ASC");
            rs = ps.executeQuery();
            System.out.println("Tao ranking Query executed");
            while (rs.next()) {
                int clan = rs.getByte("clan");
                int rank = rs.getInt("taorank");
                int clanrank = rs.getInt("clantaorank");
                TaoRankingInfo taorankk = new TaoRankingInfo(
                        rs.getString("name"),
                        clan,
                        rs.getInt("reborns"),
                        rs.getInt("taocheck"),
                        rank,
                        clanrank);
                taoRankings.put(rs.getRow(), taorankk);
                taoRankingsByName.put(rs.getString("name"), taorankk);               
            }
            rs.close();
            ps.close();
        } catch (SQLException ex) {
            ex.printStackTrace();
        } finally {
            try {
                if (rs != null) {
                    rs.close();
                }
                if (ps != null) {
                    rs.close();
                }
            } catch (SQLException ex) {
                ex.printStackTrace();
            }
        }
    }