Fix getVersion function