attempted fix for crash