fixed errors in constructors and getters