Fix #275, close #297
Fix git version in nightlies