Added empty repository check