fix for null handling