Fixed error in constructor