fixed charging bug