bugfix from issue found by @sebastianbarfort