Bugfix in constructor