Fixed a bug that crashed app on start.