fixed a bug when no cmsdocuments are found