Bugfix in unused code