Fixed typo in variable naming causing application to segfault.