fix github detection code