quick fix to the battery check script