added protection against screen lock