Bugfix: wasn't interrupt safe