Precautions for spurious wakeups

Thanks to @kitskub for pointing this out
Signed-off-by: Aleksi Sapon <QcTechs@gmail.com>