fixed getVersion error when not in specified device, improved test code coverage to 100%