fix bug in wrong var