attempted fix for null crash