fixed constructor variable bug