Include null reference exception fix in sample project