Fixed batch rebuilding + store number of visible instances