fix version import error

Thanks for @nicoddemus  's feedback,  there is a bug in getting version.