Fix getting repository's type