added number indicator for selected metadata, fixed a crashing bug when there is no metadata collected