Fixed crashing error