fixed battery parsing script