preventing deep sleep - see [bugs:#46]

Fixing [bugs:#46] by applying the provided patch.