Fix getting name of extension