(refs #50)Fix search logic in empty repository

Fix #50