Replaced get_template_directory_uri()  with the variable already declared locally in the function.