Bug in constructor