Fixed crash on application startup.