Attempted fix for crash