Removing warning: shadowing outer local variable