Solar charging fix.

Fixes #3082

Thank you to d3athrow for the fix.