Fix DatabaseWindow countings