fix for bug due to variable renaming for clarity