flickering fix and blackout fix, maybe fixes #118