Fix paused

Rebased on latest master.
Fixes: #497