fixed naming error and reference in constructor