fixed null var ref