bugfix: don't get stuck in busy loop