fix: typing errors, duplicate variable names