public void removeFact(int id) {
        PreparedStatement ps = null;
        
        try{
           stat.setQueryTimeout(30);
            String sql ="SELECT * FROM Fact Where Id ="+id;
            ResultSet rs = stat.executeQuery(sql);
            
            int count = rs.getInt("Counter");
            
            if(count >0)
            {
                sql = "UPDATE Fact SET Counter ="+(--count)+" Where Id ="+id;
                stat.executeUpdate(sql);
            }
           
        }catch (Exception e)
        {
            System.err.println("Removing fact " + id + " failed");
            System.err.println(e.getMessage());
        }
        
    }