fix dot printing problem when the state is minus