Fixed turn on the screen algorithm
Merge pull request #937 from jtrax/bugfixes

Fixed turn on the screen algorithm