Fixed crashing application.