Bug fixed in constructor