Fixing issues when going to soft sleep