fix wake-up check