Error fixed in constructor