bugfix in code