Prevent flickering. Fixes #6