fixed an error that manifested because of mis named variables