Attempted to fix crash bug.