fixed type specifications in constructor - debugging segfault