Fix bug for not staying on repository root