fix missing var issue due to ugly copy paste