fix a typo
Adds a check to ensure power mode gets updated safely.

fixes #8