Applied fix from Martin, changed interupting logic a bit