fixed null handling