Logical bug in constructor fixed