Bugfix for previous commit c3fe35b