fixed redeclaration of variable within callback func - jslint