Bugfix for constructor