fix for null crash