solved problem when screen turns off