Fixed bug that caused whole app to crash.