fix for NullRef