fixed constructor errors